import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/home/index')
  },
  {
    path: '/record',
    name: 'record',
    component: () => import('@/views/record/index')
  },
  {
    path: '/detailRed',
    name: 'detailRed',
    component: () => import('@/views/detail/red')
  },
  {
    path: '/myGoods',
    name: 'myGoods',
    component: () => import('@/views/myGoods/index')
  },
  {
    path: '/share',
    name: 'share',
    component: () => import('@/views/share/index')
  },
  {
    path: '/rule',
    name: 'rule',
    component: () => import('@/views/rule/index')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
